package io.potato.ts.domain;

import java.io.Serializable;
import java.time.LocalDateTime;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import io.potato.core.BaseEntity;
import io.potato.core.excel.ExportField;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 上行短信（已收到的短信）
 * NOTICE： this file is generated by code, DO NOT modify it!
 * @author timl
 *
 * <p>2019-01-08 09:47:19</p>
 */
 
@Entity
@Table(name="sms_up_record")
@Data
@EqualsAndHashCode(callSuper=false)
public class SmsUpRecord extends BaseEntity implements Serializable{

	private static final long serialVersionUID = 1546912039664L;

	/**
	 * 
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	
	/**
	 * 接收人用户ID
	 */
	@Column(name="user_id")
	private Integer userId;
	
	/**
	 * 上行短信的唯一标识
	 */
	@Column(name="msg_id")
	private String msgId;
	
	/**
	 * 华为接口返回的短信唯一标识
	 */
	@Column(name="hw_msg_id")
	private String hwMsgId;
	
	/**
	 * 上行短信发送方的号码
	 */
	@Column(name="from_num")
	@ExportField(label = "发送号码", order = 1)
	private String fromNum;
	
	/**
	 * 上行短信接收方的号码 完整的号码
	 */
	@Column(name="dest_num")
	private String destNum;
	
	/**
	 * 短信内容
	 */
	@ExportField(label = "短信内容", order = 2)
	private String content;
	
	/**
	 * 接收用户的拓展码l如单位拓展码
	 */
	@Column(name="user_code")
	private String userCode;
	
	/**
	 * 完整的接收方拓展码
	 */
	@Column(name="extend_code")
	private String extendCode;
	
	/**
	 * 客户端下载次数
	 */
	@Column(name="read_times")
	private Integer readTimes;
	
	/**
	 * 上行短信接收时间
	 */
	@Column(name="receive_time")
	@ExportField(label="接收时间", order = 4)
	private LocalDateTime receiveTime;
	
	/**
	 * 0  正常   1  已废弃
	 */
	private Integer status;
	
	/**
	 * 
	 */
	@Column(name="created_at", insertable=false, updatable=false)
	private LocalDateTime createdAt;
	
	/**
	 * 
	 */
	@Column(name="updated_at", insertable=false, updatable=false)
	private LocalDateTime updatedAt;
	
}